package com.eastmoney.emis.edda;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @description: Description
 * @projectName: com.eastmoney.emis.edda
 * @package: com.eastmoney.emis.edda
 * @author: 韩庆瑞
 * @date: 2021/3/10 16:15
 * @version: 1.0
 */
@SpringBootApplication
@EnableFeignClients
@EnableAsync
@EnableScheduling
public class HsbcEddaApplication {

    @Bean
    public ConfigurableServletWebServerFactory webServerFactory() {
        TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
        factory.addConnectorCustomizers((TomcatConnectorCustomizer) connector -> connector.setProperty("relaxedQueryChars", "|^"));
        return factory;
    }

    public static void main(String[] args) throws Exception {
        SpringApplication.run(HsbcEddaApplication.class, args);
    }
}

